﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ServiceModel;
using KvoMvc.BusinessEntity;
using System.Web.Security;

namespace KvoMvc.BusinessContract
{
    [ServiceContract]
    public interface ISecurityManager
    {
        /// <summary>
        /// Validate user.
        /// </summary>
        /// <param name="logOn"></param>
        /// <returns></returns>
        [OperationContract]
        bool IsValidUser(LogOn logOn);

        /// <summary>
        /// Set authenticate cookie.
        /// </summary>
        /// <param name="logOn"></param>
        [OperationContract]
        void SetAuthCookie(string userName, bool isCreatePersistentCookie);

        /// <summary>
        /// Sign out.
        /// </summary>
        [OperationContract]
        void SignOut();

        /// <summary>
        /// Create new user.
        /// </summary>
        /// <param name="register"></param>
        /// <returns></returns>
        [OperationContract]
        MembershipCreateStatus CreateUser(Register register);
    }
}
